home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume9 / umoria3 / patch1b < prev    next >
Encoding:
Text File  |  1990-06-08  |  53.2 KB  |  1,231 lines

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i016:  umoria3 - single player dungeon simulation (ver. 5.2), Patch1b
  5. Message-ID: <5723@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 16:39:04 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1220
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: wilson@ernie.Berkeley.EDU (Jim Wilson)
  12. Posting-number: Volume 10, Issue 16
  13. Archive-name: umoria3/Patch1b
  14. Patch-To: umoria3: Volume 9, Issue 55-86
  15.  
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 2 (of 3)."
  24. # Contents:  mac/MakeFile.hqx mac/dumpres/MakeFile.hqx
  25. #   mac/scrnmgr/ScrnMgr.doc source/player.c
  26. # Wrapped by wilson@atlas on Wed May 30 14:20:00 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'mac/MakeFile.hqx' -a "${1}" != "-c" ; then 
  29.   mv -f mac/MakeFile.hqx mac/MakeFile.hqx.old
  30. fi
  31. echo shar: Extracting \"'mac/MakeFile.hqx'\" \(8517 characters\)
  32. sed "s/^X//" >'mac/MakeFile.hqx' <<'END_OF_FILE'
  33. X(This file must be converted with BinHex 4.0)
  34. X:#%eKDf9'D@aP!&4&@&408&-J!3!!!"E0!!!"IRGE3dp`G'P[ER-J23N*,@)b)#e
  35. Xc)(Y%C@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jS)'eKBh*cFQ-ZD!eYEfjcG'9bFbjbFh*M,Qm*#F3*BfpZFh4KER3
  152. XZD#"MEfjQD@FZD#"dHA"PFbjS$A"XBAPPFLjbFh*M,Qm*#F3*BfpZFh4KER3ZD#"
  153. XMEfjQD@FZD#"dHA"PFbjS$A4KBQaPFbjbFh*M,Qm*#F3*BfpZFh4KER3ZD#"MEfj
  154. XQD@FZD#"dHA"PFbjS$A4bC@&cGA*P,R*cFQ-ZE`N*a!PMEfjcG'&ZG#jS)'0[EQC
  155. XTCbjS)(4jF'9c,QJ0GQ&bD@&LE'8ZFR0bBbj[#3R%#@0[ER0dB@jd,QJJBfpZCQP
  156. XR,QJJG(P`CA-ZD!fU&J!!!3!!!!&-!!!!6!!!!$)!!!!F!%!!3!#D!F3!!3%!!!!
  157. X!!!!!!))(3fpZCQPbE3K0B@YP4QPXC5d#!!!!9%9B9%e38b!"!!!!!%!!!!!!!!"
  158. X849K869"6)!%!!!!!3!!!!!!!!!!!!!!!!!!!!!!!!++&Jjm!!"E0!!!"IJ#$!!!
  159. X!!*3!"`!!!!!!M!%!!*i"4J3$6Q9h!!!!!!!!TJ%!!,J"4J3'3f&ZBf9X!!!!!!#
  160. X0!!i!R3#kL!Y1CAFJ9fPZC'ph1J!!!!!!!"S!h`!Z!9Z!!!!!!!!!0!%!!%B"4J3
  161. X&4@TPBh3!!!!!!!"1!3!!B!&'"!9%FQPfC3!!!!!!!!")!!P0EfjKBfm!!!!!!!!
  162. X!!!!!!!!!!!!!!!!!!!!!!!!!!!!'!!3!2J!2!G-#F`!q!!m"d`*cSS@5q3!!&Xd
  163. X!!"E0!!!6e`%!!!!"!!!!!8`!!!"-!!!!-J!Z#8!)&J!!!"`!-J!!69"68J!!!!S
  164. X$lIrr!!!!!!![$)42eJ:
  165. END_OF_FILE
  166. if test 8517 -ne `wc -c <'mac/MakeFile.hqx'`; then
  167.     echo shar: \"'mac/MakeFile.hqx'\" unpacked with wrong size!
  168. fi
  169. # end of 'mac/MakeFile.hqx'
  170. if test -f 'mac/dumpres/MakeFile.hqx' -a "${1}" != "-c" ; then 
  171.   mv -f mac/dumpres/MakeFile.hqx mac/dumpres/MakeFile.hqx.old
  172. fi
  173. echo shar: Extracting \"'mac/dumpres/MakeFile.hqx'\" \(1515 characters\)
  174. sed "s/^X//" >'mac/dumpres/MakeFile.hqx' <<'END_OF_FILE'
  175. X(This file must be converted with BinHex 4.0)
  176. X:#%eKDf9'D@aP!&4&@&408&-J!3!!!!+E!!!"IV2*3dp`G'P[ER-J25!YE@*R)'p
  177. XZ$8a2F(4TEfjc)$d0$84eEA"5CA-ZEb$%)%4eEA"5CA-ZB`d*3b"l3dp`G'P[ER0
  178. Xp)#e[)%4eEA"5CA-ZEb"%G@e`8Q9c,Q-0$84eEA"5CA08CA0d,Q-ZEb$%)%4eEA"
  179. X5CA08CA0d,Q-0#8-JHd02F(4TEfjcI5"%G@e`8Q9c9'9cG#jM$3N06f*UC@0dFb!
  180. Xp)%4eEA"5CA08CA0d,Q-ZEb"%G@e`8Q9c,Qm0$5-J5PFk)%05G@jdD@eP,QmJB@j
  181. XN)%0*ER4PFQCKBf8ZEb"bC@e[GQ9N)(0TEQ0P)%NJGf&c)(4[E'3JG'KKG#"dD'9
  182. Xj)'&bC5"[BR0[E'9dC3e%G@e`8Q9c9'9cG#$%a#"l6f*UC@0dFhd0#8aTEQXJHda
  183. X2F(4TEfjcI5!YGb!YBb!R69"6)#FJ,A3J69"69##f$3N*HdpLDQ9MG(0p),B0#3N
  184. XLHdaTBR*KFQPPFhdLFh4eBR-ZEb#f$3N*)RY-D@*bBA*TCA0p)P*eER4TE@8ZEb#
  185. Xf$3N*)RY-D@*bBA*TCA0p)NPZG'9bCQ&MC5j[),B0#3NLHd0-D@*bBA*TCA0p)P0
  186. XdC%0-D@)ZEb#f$3N*)RY$6'PLFQ&bD@9cI5*$8d&148aTBLj[),B0#3NLHd0-D@*
  187. XbBA*TCA0p)NeKG'JZEb#f$3N*)RY-D@*bBA*TCA0p)P4[Efa-D@*c,QmJYJd*#5e
  188. X[)%4eEA"5CA08CA0d$3e*ER0dB@aX)-3J4(9YF&*PFbjS)%4eEA"5CA-ZE`d*4(9
  189. X`E'PMBA4P)#ej)%4eEA"5CA-ZD#!LHd0*EQ0XG@4PFhdL$3P%GA"XD@0KG'8J,AN
  190. XJ4(9YF&*PFbj[)#*l3daTBR*KFQPPFhdL$6Yi!!!"!!!!!8`!!!"-!!!!-N4eEA"
  191. X5CA08CA0d,QeKDf80)b!J)&4KFQGPG$SJ)#!J$8eKDf9'D@aP,Q4eEA!#!!!!9%9
  192. XB9%e38b!!!!!!!!!!!&4&@&408&-J!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!SS@
  193. X$J3!!!TX!!!&qBA*MD#!e,#!a16Jj)$%b1M)a1M3d$3e%G@e`8Q9c9'9cG#jM,Qm
  194. XJa#"%G@e`8Q9c9'9cG#jYB@YP)%4eEA"5CA08CA0d,Q-0#8-J4(9YF&*PFe4PFh3
  195. XZB`e%G@e`8Q9c,Q-ZEb$%)%4eEA"5CA08CA0d,QeKDf8J4(9YF&*PFbjM$3!!!%J
  196. X!#8e[EQ&ME`##!!-!#3!+Irm!$J!*!!Trr`#(!)%!JRrr!!B!"!!q!!m"d`*c!$i
  197. X!$`(6!R1LKBLX!!!#!J!!!J)!!!!!!3!!!!%!!!!"6!!!!%`!!!!b!#eT3!Kd!!!
  198. X!(!!b!!"08&05!!!!#J2Yrrm!!!!!!#jV*$e,:
  199. END_OF_FILE
  200. if test 1515 -ne `wc -c <'mac/dumpres/MakeFile.hqx'`; then
  201.     echo shar: \"'mac/dumpres/MakeFile.hqx'\" unpacked with wrong size!
  202. fi
  203. # end of 'mac/dumpres/MakeFile.hqx'
  204. if test -f 'mac/scrnmgr/ScrnMgr.doc' -a "${1}" != "-c" ; then 
  205.   mv -f mac/scrnmgr/ScrnMgr.doc mac/scrnmgr/ScrnMgr.doc.old
  206. fi
  207. echo shar: Extracting \"'mac/scrnmgr/ScrnMgr.doc'\" \(20464 characters\)
  208. sed "s/^X//" >'mac/scrnmgr/ScrnMgr.doc' <<'END_OF_FILE'
  209. XCopyright (C) Curtis McCauley, 1989.  All rights reserved.
  210. X
  211. XYou may copy this subroutine package freely, modify it as you desire,
  212. Xand distribute it at will, as long as the copyright notice in the
  213. Xsource material is not disturbed, excepting that no one may use this
  214. Xpackage or any part of it for commercial purposes of any kind without
  215. Xthe express written consent of its author.
  216. XThis document describes a package of subroutines I have decided to
  217. Xcall the Screen Manager.
  218. X
  219. XEnclosed files:
  220. X
  221. XScrnMgr.doc        What you are reading
  222. X
  223. XScrnMgr.c        The source for the subroutine package
  224. XScrnMgr.r        Resources used by the subroutines
  225. XScrnMgr.h        Include file for applications
  226. X
  227. XScrnMgr.rsrc    The Rez output from ScrnMgr.r (if you do not have Rez)
  228. X
  229. XScrnTest.c        A test application
  230. XScrnTest.r        Resources used by the test application
  231. X
  232. XMakeFile        What the name implies
  233. X
  234. XThe package is pretty heavily built around MPW.  It is specifically
  235. Xtailored for version 3.0, but should work with 2.0.2.  The only thing
  236. XI think you would have to modify for the older version is the SIZE
  237. Xresource.  Porting the package to other environments is not something
  238. XI would recommend.
  239. X
  240. XThe make file recognizes two primary targets: ScrnTest - which will
  241. Xbuild the test application along with the subroutine package object
  242. Xfile, and Install - which will copy the object files to appropriate
  243. Xdirectories.  If you have a non-standard MPW directory structure, you
  244. Xwill want to modify the rules for Install.
  245. X
  246. XI initially built the subroutine package around a model of the IBM PC
  247. Xscreen BIOS calls.  The idea was to take a public domain curses
  248. Xpackage for the PC and replace all the BIOS calls with calls to my
  249. Xpackage.  Since my ultimate goal was to port the UNIX moria program
  250. Xwhich relied on curses, and the only copy of curses I had was the PC
  251. Xversion, this strategy initially seemed to make sense.  Moria, as it
  252. Xturns out, only calls a few of the curses routines, so I never had to
  253. Xactually port the whole PC curses package.  It was a lot easier to
  254. Xjust replace the curses calls in moria with direct calls to my
  255. Xsubroutine package.  By reducing the number of software layers I
  256. Xachieved better performance, anyway.
  257. X
  258. XStill, the internal structure of the package resembles the PC BIOS.  I
  259. Xkeep two large byte arrays to hold the entire screen, one with the
  260. Xcharacters, the other with the attributes.  The attributes are
  261. Xforeground and background color (the eight original quickdraw colors),
  262. Xunderlined, and italicized.  The bulk of the package, at least in
  263. Xnumber of functions, is taken up with routines to manipulate these
  264. Xbuffers, either to put data in or take data out.  Whenever the
  265. Xcontents of the buffers are changed, the window is not immediately
  266. Xupdated to reflect the change.  Instead, I "invalidate" the portion of
  267. Xthe window changed.  This is done by using InvalRect(), which causes
  268. Xthe area to be accumulated in the update region of the window, or by
  269. Xadding the area to an internal representation of the dirty area of the
  270. Xscreen.  This internal representation is less precise than the region
  271. Xwhich is kept by quickdraw calls to InvalRect().  It consists of the
  272. Xbeginning and ending dirty area on each screen line.  The latter
  273. Xmethod is faster, but the screen changes will only be noticed when a
  274. Xcall to update the screen is explicitly made, as opposed to the idle
  275. Xroutine (see below) catching an update event.  There are two sets of
  276. Xroutines, then, to change the screen buffers.  The ones prefixed with
  277. Xa 'D' (for delayed update) use the later method.
  278. X
  279. XA program which uses this package, at a minimum, has to call
  280. XInitScreenMgr() at the beginning to open the window, call
  281. XIdleScreenMgr() frequently in the middle to handle all the standard
  282. Xmac events (mouse and keyboard events, especially, but also the
  283. XMultiFinder stuff as well), and call CloseScreenMgr() at the end.  The
  284. Xbest time to call the idle routine is whenever your program is waiting
  285. Xfor a keystroke.  Another good time is at regular intervals in a heavy
  286. Xcompute loop.  If you do this, you can actually get your program to
  287. Xrun in the background, but all the idle calls will, of course, slow
  288. Xthings down some.  In heavy compute passages, then, you might instead
  289. Xwant to bracket the code with calls to BeginScreenWait() and
  290. XEndScreenWait() to change the mouse cursor to a spinning watch.
  291. X
  292. XA description of each routine in the package follows --
  293. X
  294. Xint InitScreenMgr(int h, int v, char *title,
  295. X    char *resFile, OSType rfCreator, OSType rfType,
  296. X    void (*fileMenuProc)(int item),
  297. X    void (*appMenuProc)(int item),
  298. X    int multiColorFlag);
  299. X
  300. XThis routine initializes the package, allocates buffers, and puts the
  301. Xwindow on the monitor.  H and v are the dimensions of the screen in
  302. Xcharacters.  Title is the window title.  ResFile, rfCreator, and
  303. XrfType describe the file to contain the configuration information.
  304. XThis file will be maintained in the system folder.  It remembers the
  305. Xposition and size of the window, the font size selected, and, if the
  306. Xscreen is only two colors, the user's choices for foreground and
  307. Xbackground color.  FileMenuProc points to a routine to be called when
  308. Xa selection from the file menu is made.  A click in the window's close
  309. Xbox is considered like a selection from the menu, resulting in a call
  310. Xto fileMenuProc with the item number equal to the constant
  311. XcloseBoxItem.  AppMenuProc points to a routine to be called when a
  312. Xselection from the application menu is made.  Both can be NULL, in
  313. Xwhich case the subroutine package will handle them as best it can.
  314. XMultiColorFlag is non-zero when more than two colors will be displayed
  315. Xon the screen.
  316. X
  317. Xvoid IdleScreenMgr(void);
  318. X
  319. XThis routine handles the macintosh event queue.  It must be called
  320. Xfrequently, or the user will not be able to select from menus, switch
  321. Xto another program or desk accessory, etc.  It also blinks the screen
  322. Xcursor.
  323. X
  324. Xvoid ShowScreen(int visible);
  325. X
  326. XShows or hides the screen window, depending upon the visible flag.
  327. X
  328. Xvoid CloseScreenMgr(void);
  329. X
  330. XCloses the window, deallocates buffers.
  331. X
  332. Xvoid SetScreenQuitProc(void (*quitProc)(void), int willReturnFlag);
  333. X
  334. XTells the package what routine to call when quit is chosen.  If the
  335. Xroutine pointed to by quitProc will always return (as opposed to doing
  336. Xsomething like ExitToShell()), willReturnFlag should be non-zero.
  337. X
  338. Xvoid SetScreenAboutProc(void (*aboutProc)(void));
  339. X
  340. XAllows the standard about box to be overridden.  AboutProc points to a
  341. Xroutine which should be called when the about item is chosen from the
  342. Xapple menu.
  343. X
  344. XThe following routines all manipulate the screen buffers.  Calls
  345. Xbeginning with 'Set' do not move the screen cursor and need to be told
  346. Xwhere to begin the operation.  Calls beginning with 'Write' move the
  347. Xcursor and begin the operation at the current cursor location.  All of
  348. Xthese routines can be prefixed with a 'D' to make changes to the
  349. Xinternal dirty area instead of calling InvalRect().  The internal
  350. Xdirty area is updated only when a call to UpdateScreen() is made or
  351. Xsome external update event is generated and caught by the idle
  352. Xroutine.
  353. X
  354. XThe screen cells are indicated by column (h) and row (v) numbers which
  355. Xincrease from left to right and top to bottom.  Hence the upper left
  356. Xof the screen is (0, 0) and the bottom right is (h, v) as set by the
  357. Xcall to InitScreenMgr().
  358. X
  359. Xvoid SetScreenChar(char c, int h, int v);
  360. X
  361. Xvoid SetScreenCharAttr(char c, char a, int h, int v);
  362. X
  363. Xvoid WriteScreenChar(char c);
  364. X
  365. Xvoid WriteScreenCharAttr(char c, char a);
  366. X
  367. XSets the character at (h, v) to c and the attribute to a.
  368. X
  369. Xvoid SetScreenBuffer(char *buffer, int rowBytes,
  370. X    Rect *area, int h, int v);
  371. X
  372. Xvoid SetScreenBufferAttr(char *buffer, char a,
  373. X    int rowBytes, Rect *area, int h, int v);
  374. X
  375. Xvoid WriteScreenBuffer(char *buffer, int rowBytes, Rect *area);
  376. X
  377. Xvoid WriteScreenBufferAttr(char *buffer, char a,
  378. X    int rowBytes, Rect *area);
  379. X
  380. XSets the block of characters at (h, v) to the contents of buffer and
  381. Xall the attributes to a.  RowBytes indicates the number of bytes in a
  382. Xrow in buffer.  Area indicates the block of characters to copy,
  383. Xassuming that the first byte in buffer is at (0, 0).  Note: This means
  384. Xthat the area rectangle is in buffer coordinates, not screen
  385. Xcoordinates.
  386. X
  387. Xvoid SetScreenString(char *str, int h, int v);
  388. X
  389. Xvoid SetScreenStringAttr(char *str, char a, int h, int v);
  390. X
  391. Xvoid WriteScreenString(char *str);
  392. X
  393. Xvoid WriteScreenStringAttr(char *str, char a);
  394. X
  395. XSets the characters at (h, v) and following to the contents of string
  396. Xand all the attributes to a.
  397. X
  398. Xvoid SetScreenImage(char *c, char *a, int rowBytes,
  399. X    Rect *area, int h, int v);
  400. X
  401. Xvoid WriteScreenImage(char *c, char *a,
  402. X    int rowBytes, Rect *area);
  403. X
  404. XSets the block of characters at (h, v) to the contents of c and the
  405. Xattributes to the contents of a.  RowBytes indicates the number of
  406. Xbytes in a row in the c and a buffers.  Area indicates the block of
  407. Xbytes to copy, assuming that the first byte in the buffers is at (0,
  408. X0).  Note: This means that the area rectangle is in buffer
  409. Xcoordinates, not screen coordinates.
  410. X
  411. Xvoid FillScreen(char c, char a, Rect *area);
  412. X
  413. XFills the part of the screen indicated by area with the character c
  414. Xand the attribute a.  Area is in screen coordinates.
  415. X
  416. Xvoid EraseScreen(Rect *area);
  417. X
  418. XFills the part of the screen indicated by area with the blank
  419. Xcharacter (0x20) and the normal attribute (attrNormal).  Area is in
  420. Xscreen coordinates.
  421. X
  422. Xvoid ScrollScreen(int dh, int dv, Rect *area, char a);
  423. X
  424. XScrolls the part of the screen indicated by area the distance
  425. Xindicated by dh and dv (which may be negative).  The leftover space is
  426. Xfilled with the blank character (0x20) and the normal attribute
  427. X(attrNormal).  Area is in screen coordinates.
  428. X
  429. Xvoid MoveScreenCursor(int dh, int dv);
  430. X
  431. XMoves the screen cursor by the number of character cells indicated by
  432. Xdh and dv (which may be negative).
  433. X
  434. Xvoid SetScreenCursor(int h, int v);
  435. X
  436. XPositions the screen cursor at the character cell indicated by h and v.
  437. X
  438. Xvoid DefineScreenCursor(int color, int lines, int blinkRate);
  439. X
  440. XDefines the screen cursor.  Color indicates what you would expect,
  441. Xlines indicates the height of the cursor in pixels (up to the height
  442. Xof the character cell, so lines = 32767 will probably give you a block
  443. Xcursor), and blinkRate indicates the number of clock ticks between
  444. Xcursor blinks or zero for a non-blinking cursor (a really friendly
  445. Xprogram will use GetCaretTime() to set this).  The default cursor uses
  446. Xblack, 2 lines, and no blinks.  It is initially hidden.
  447. X
  448. Xvoid HideScreenCursor(void);
  449. X
  450. Xvoid ShowScreenCursor(void);
  451. X
  452. XAn internal counter is used to keep track of whether the cursor is to
  453. Xbe shown on the screen.  When it is less than or equal to zero, the
  454. Xcursor is hidden.  Otherwise it is shown.  The hide routine decrements
  455. Xthis counter.  Show increments it.
  456. X
  457. Xvoid UpdateScreen(void);
  458. X
  459. XImmediately draws the dirty portion of the screen.  The dirty portion
  460. Xincludes the update region of the window and the internal dirty area
  461. Xmaintained by the 'D' buffer manipulation routines.
  462. X
  463. XIn addition to the macintosh event queue, this package maintains a
  464. Xbuffer of keystrokes and mouse clicks.  Whenever the idle routine is
  465. Xcalled, the events are pulled out of the macintosh queue and put into
  466. Xthe internal buffer.
  467. X
  468. Xvoid FlushScreenKeys(void);
  469. X
  470. XFlushes the internal buffer of keystrokes and the macintosh event queue.
  471. X
  472. Xint CountScreenKeys(void);
  473. X
  474. XCounts the number of entries in the internal keystroke buffer.
  475. X
  476. Xint GetScreenKeys(char *keyCode, char *modifiers, char *ascii,
  477. X    int *h, int *v);
  478. X
  479. XPulls the top element off the internal buffer.  KeyCode contains the
  480. Xkeycode as described in the IM Event Manager documentation.  Modifiers
  481. Xcontains bits which indicate the state of the control keys (command,
  482. Xshift, caps lock, option, and control) and whether the event is a
  483. Xmouse click.  There are masks defined in ScrnMgr.h that indicate the
  484. Xexact bit for each.  In the case of a mouse click, h and v will be
  485. Xset.  If you are not interested in mouse clicks, you can pass NULLs
  486. Xfor both.  Ascii will get the ascii code of the key hit.  If the
  487. Xkeyboard in use has a control key, the ascii value is taken right from
  488. Xthe event which will contain the appropriate control code.  If the
  489. Xkeyboard does not have a control key, a test is made to see if the
  490. Xcommand modifier key is down. If so, the ascii value is converted to
  491. Xthe appropriate control code.  See the discussion on MENU resources
  492. Xbelow to see how command key equivalents work on machines without a
  493. Xcontrol key.
  494. X
  495. Xvoid EnableScreenMouse(int flag);
  496. X
  497. XEnables or disables the queuing of mouse clicks in the internal
  498. Xbuffer, according to flag.  Initially, mouse clicks are disabled.
  499. X
  500. Xvoid ClipScreenMouse(Rect *clip);
  501. X
  502. XLimits the detection of mouse clicks to the area indicated by clip,
  503. Xmeasured in character cells on the screen.
  504. X
  505. Xvoid GetScreenCharAttr(char *c, char *a, int h, int v);
  506. X
  507. XReturns in c and a the character and attribute at (h, v).
  508. X
  509. Xvoid GetScreenImage(char *c, char *a, int rowBytes,
  510. X    Rect *area, int h, int v);
  511. X
  512. XReturns in c and a the block of characters and attributes beginning at
  513. X(h, v).  RowBytes indicates the number of bytes in a row in the c and
  514. Xa buffers.  Area indicates the block of bytes to copy, assuming that
  515. Xthe first byte in the buffers is at (0, 0).  Note: This means that the
  516. Xarea rectangle is in buffer coordinates, not screen coordinates.
  517. X
  518. Xvoid GetScreenCursor(int *h, int *v);
  519. X
  520. XReturns the screen coordinates of the cursor.
  521. X
  522. XThe next few routines help with dialogs.  They are designed to work
  523. Xwith multi-monitor systems.  On such systems, the active monitor is
  524. Xchosen by the current mouse location, arguably not a good choice, but
  525. Xprobably a choice as good as any other.
  526. X
  527. Xint YesOrNo(char *question);
  528. X
  529. XPuts up a dialog box with the string pointed to by question, a button
  530. Xfor yes (the default), and a button for no.  Returns true if yes is
  531. Xselected.  The box will be centered horizontally on the active
  532. Xmonitor, one-third of the way from the top.
  533. X
  534. Xint DoScreenALRT(int id, int kind, Fixed hRatio, Fixed vRatio);
  535. X
  536. XPuts up the alert indicated by id.  Kind specifies the type of alert
  537. X(normal, stop, note, or caution).  There are constants defined in
  538. XScrnMgr.h for each of these kinds.  The alert will be centered hRatio
  539. Xof the way from the left and vRatio of the way from the top of the
  540. Xactive monitor.  (I.e., if hRatio = vRatio = .5, the alert will be
  541. Xexactly in the middle of the screen.)  ScrnMgr.h contains fixed
  542. Xconstants for common ratios.  See IM for a general discussion of fixed
  543. Xnumbers.  Returns the item number of the button pressed.
  544. X
  545. Xvoid CenterScreenDLOG(int id, Fixed hRatio, Fixed vRatio,
  546. X    int *h, int *v);
  547. X
  548. XGiven a DLOG, which does not have to be currently shown on the screen,
  549. Xindicated by id, and hRatio and vRatio, returns where to position its
  550. Xtop left corner in h and v.  See DoScreenALRT for an explanation of
  551. XhRatio and vRatio.  This routine is generally used prior to calling
  552. XGetNewDialog().  You should declare your DLOG to be invisible, call
  553. XMoveWindow() using h and v to center it, and then call ShowWindow().
  554. X
  555. Xvoid GetScreenBounds(Rect *bounds);
  556. X
  557. XReturns the bounds in global coordinates of the active monitor, less
  558. Xthe menu bar if it is on this monitor.
  559. X
  560. Xpascal void DrawDefaultBorder();
  561. X
  562. Xpascal void DrawGroupRect();
  563. X
  564. XTwo handy routines for installing in dialog userItems.
  565. X
  566. Xvoid ConfigScreenMgr(int force, ResType theType, int theID,
  567. X    int (*configProc)(Handle theData));
  568. X
  569. XA routine to manipulate resources in the configuration file.  Checks
  570. Xfor the presence of the resource indicated by theType and theID.  If
  571. Xthis resource is not found, it does nothing.  If the resource is found
  572. Xsomewhere other than in the configuration file (see InitScreenMgr()),
  573. Xthis routine assumes that some action needs to be taken.  The usual
  574. Xplace other the the configuration file to find this kind of resource
  575. Xis in the program file itself and logically represents default values.
  576. XIf some action needs to be taken or force is non-zero, the routine
  577. Xpointed to by configProc is called.  TheData contains a handle to the
  578. Xresource found as described above.  ConfigProc should generally put up
  579. Xa dialog box to change the data in theHandle.  If it does change the
  580. Xdata, configProc should return true.  Otherwise, false.  If configProc
  581. Xreturns true, the handle is marked changed so that it is added to the
  582. Xconfiguration file.  A nice time to call this routine is at the start
  583. Xof your program with force false, so that initial configuration
  584. Xinformation can be obtained from the user.  Then provide a menu item
  585. Xin the application menu to allow the user to change it later, calling
  586. Xthis routine with force true.
  587. X
  588. Xvoid BeginScreenWait(int rate);
  589. X
  590. XChanges the cursor to a spinning wristwatch.  Rate indicates the
  591. Xnumber of ticks between each spin.
  592. X
  593. Xvoid EndScreenWait(void);
  594. X
  595. XReturns the cursor to the standard arrow.
  596. X
  597. XHandle GetFileMHandle(void);
  598. X
  599. XHandle GetAppMHandle(void);
  600. X
  601. XReturns a handle to the file or application menu.
  602. X
  603. Xint PushScreen();
  604. X
  605. XSaves the current screen buffer (characters, attributes, and cursor
  606. Xlocation) on a stack.  Allocates a significant amount of memory.
  607. XReturns 0 if successful.
  608. X
  609. Xvoid PopScreen()
  610. X
  611. XSets the screen contents to the last screen saved by PushScreen().  If
  612. Xthere are no saved screens on the stack, does nothing.
  613. X
  614. XYou should include in your application all the resources found in the
  615. Xfile ScrnMgr.rsrc.  This file is produced from ScrnMgr.r by the MPW
  616. Xtool Rez.  The best way to do this, assuming you have Rez, is to
  617. Xinclude at the beginning of your program's .r file, the line 'include
  618. X"ScrnMgr.rsrc";'
  619. X
  620. XThis package assumes that your program will have 4 or 5 menus: the
  621. XApple, File, Edit, Screen (FontSize), and optionally an "application"
  622. Xmenu.  You can override the standard file menu, if you provide a
  623. XfileMenuProc in the InitScreenMgr() call.  If you do override, you
  624. Xshould provide two menu resources to replace the default ones in
  625. XScrnMgr.rsrc.  The first must be MENU(129).  The second, MENU(229),
  626. Xmust be a copy of the first, except for not having any command key
  627. Xequivalents.  It will be used on machines without a control key.  In
  628. Xother words, machines without a control key on the keyboard cannot use
  629. Xcommand key equivalents.  If you want to implement an application
  630. Xmenu, you must provide an appMenuProc to the initialization routine,
  631. Xalong with MENU(133) and MENU(233).  The first menu is the application
  632. Xmenu with command key equivalents, the second without.
  633. X
  634. XYou will probably want to override the STR(128) resource which
  635. Xcontains the title of the first item in the apple menu (i.e, the about
  636. Xitem).  If you override the DLOG(128) and DITL(128) resources, you can
  637. Xrely on the package to put up your customized about box.  Otherwise,
  638. Xyou can call SetScreenAboutProc() to really customize things.  The
  639. Xdefault about box mentions the version of this package and its
  640. Xprogrammer.
  641. X
  642. XThe STR(129) resource contains the name of the font the package should
  643. Xuse.  Any true monospaced font should work.  Be forewarned that very
  644. Xfew fonts are completely monospaced.  Many have a few odd characters
  645. Xwhose width is not the same as most others.  Since this package relies
  646. Xon GetFontInfo() and the returned widMax to setup the screen, even the
  647. Xpresence of one extra wide character in the font will cause funny
  648. Xthings to happen.
  649. X
  650. XYou will probably want to override the INFO(1) resource.  This
  651. Xresource contains the window size, position, font size, and colors.  A
  652. Xcopy of it is made the first time your program is run in the
  653. Xconfiguration file and is thereafter kept up to date.  Hence, the copy
  654. Xyou keep in you application file should contain the default initial
  655. Xvalues.  The window size and position are indicated by a rectangle in
  656. Xglobal coordinates.  Since ResEdit does not provide a template for
  657. Xthis kind of resource, you will have to at least look at the ScrnMgr.r
  658. Xfile to see the format of the resource if you want to use ResEdit to
  659. Xmodify it.
  660. X
  661. XFinally, you will want to supply a SIZE resource to make your program
  662. XMultiFinder friendly.
  663. X
  664. XI am somewhat ambivalent about releasing this package to the public.
  665. XI do not think that it is particularly well-written.  And I certainly
  666. Xdo not think that it does justice to what the mac is all about.  It is
  667. Xprobably full of bugs.  The only real testing that it has had is in
  668. Xthe moria port, which doesn't call all of the routines available.
  669. XHence, I do not provide an express or implied warranty of any kind.
  670. XYou use the package at your own risk.  If you have any questions, I
  671. Xcan be reached at 73230.224@compuserve.com or at 73230,224 on CIS.
  672. X
  673. XCurtis McCauley
  674. X22 July 1989
  675. END_OF_FILE
  676. if test 20464 -ne `wc -c <'mac/scrnmgr/ScrnMgr.doc'`; then
  677.     echo shar: \"'mac/scrnmgr/ScrnMgr.doc'\" unpacked with wrong size!
  678. fi
  679. # end of 'mac/scrnmgr/ScrnMgr.doc'
  680. if test -f 'source/player.c' -a "${1}" != "-c" ; then 
  681.   echo shar: Will not clobber existing file \"'source/player.c'\"
  682. else
  683. echo shar: Extracting \"'source/player.c'\" \(19680 characters\)
  684. sed "s/^X//" >'source/player.c' <<'END_OF_FILE'
  685. X/* player.c: player specific variable definitions
  686. X
  687. X   Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
  688. X
  689. X   This software may be copied and distributed for educational, research, and
  690. X   not for profit purposes provided that this copyright and statement are
  691. X   included in all such copies. */
  692. X
  693. X#include "constant.h"
  694. X#include "config.h"
  695. X#include "types.h"
  696. X
  697. X/* Player record for most player related info */
  698. Xplayer_type py;
  699. X/* player location in dungeon */
  700. Xint16 char_row;
  701. Xint16 char_col;
  702. X/* calculated base hp values for player at each level, store them so that
  703. X   drain life + restore life does not affect hit points */
  704. Xint16u player_hp[MAX_PLAYER_LEVEL];
  705. X
  706. X/* Class titles for different levels                */
  707. X#ifdef MACGAME
  708. Xchar *(*player_title)[MAX_PLAYER_LEVEL];
  709. X#else
  710. Xchar *player_title[MAX_CLASS][MAX_PLAYER_LEVEL] = {
  711. X    /* Warrior     */
  712. X{"Rookie","Private","Soldier","Mercenary","Veteran(1st)","Veteran(2nd)",
  713. X"Veteran(3rd)","Warrior(1st)","Warrior(2nd)","Warrior(3rd)","Warrior(4th)",
  714. X"Swordsman-1","Swordsman-2","Swordsman-3","Hero","Swashbuckler","Myrmidon",
  715. X"Champion-1","Champion-2","Champion-3","Superhero","Knight","Superior Knt",
  716. X"Gallant Knt","Knt Errant","Guardian Knt","Baron","Duke","Lord (1st)",
  717. X"Lord (2nd)","Lord (3rd)","Lord (4th)","Lord (5th)","Lord (6th)","Lord (7th)",
  718. X"Lord (8th)","Lord (9th)","Lord Gallant","Lord Keeper","Lord Noble"},
  719. X    /* Mage         */
  720. X{"Novice","Apprentice","Trickster-1","Trickster-2","Trickster-3","Cabalist-1",
  721. X"Cabalist-2","Cabalist-3","Visionist","Phantasmist","Shadowist","Spellbinder",
  722. X"Illusionist","Evoker (1st)","Evoker (2nd)","Evoker (3rd)","Evoker (4th)",
  723. X"Conjurer","Theurgist","Thaumaturge","Magician","Enchanter","Warlock",
  724. X"Sorcerer","Necromancer","Mage (1st)","Mage (2nd)","Mage (3rd)","Mage (4th)",
  725. X"Mage (5th)","Wizard (1st)","Wizard (2nd)","Wizard (3rd)","Wizard (4th)",
  726. X"Wizard (5th)","Wizard (6th)","Wizard (7th)","Wizard (8th)","Wizard (9th)",
  727. X"Wizard Lord"},
  728. X    /* Priests     */
  729. X{"Believer","Acolyte(1st)","Acolyte(2nd)","Acolyte(3rd)","Adept (1st)",
  730. X"Adept (2nd)","Adept (3rd)","Priest (1st)","Priest (2nd)","Priest (3rd)",
  731. X"Priest (4th)","Priest (5th)","Priest (6th)","Priest (7th)","Priest (8th)",
  732. X"Priest (9th)","Curate (1st)","Curate (2nd)","Curate (3rd)","Curate (4th)",
  733. X"Curate (5th)","Curate (6th)","Curate (7th)","Curate (8th)","Curate (9th)",
  734. X"Canon (1st)","Canon (2nd)","Canon (3rd)","Canon (4th)","Canon (5th)",
  735. X"Low Lama","Lama-1","Lama-2","Lama-3","High Lama","Great Lama","Patriarch",
  736. X"High Priest","Great Priest","Noble Priest"},
  737. X    /* Rogues     */
  738. X{"Vagabond","Footpad","Cutpurse","Robber","Burglar","Filcher","Sharper",
  739. X"Magsman","Common Rogue","Rogue (1st)","Rogue (2nd)","Rogue (3rd)",
  740. X"Rogue (4th)","Rogue (5th)","Rogue (6th)","Rogue (7th)","Rogue (8th)",
  741. X"Rogue (9th)","Master Rogue","Expert Rogue","Senior Rogue","Chief Rogue",
  742. X"Prime Rogue","Low Thief","Thief (1st)","Thief (2nd)","Thief (3rd)",
  743. X"Thief (4th)","Thief (5th)","Thief (6th)","Thief (7th)","Thief (8th)",
  744. X"Thief (9th)","High Thief","Master Thief","Executioner","Low Assassin",
  745. X"Assassin","High Assassin","Guildsmaster"},
  746. X    /* Rangers     */
  747. X{"Runner (1st)","Runner (2nd)","Runner (3rd)","Strider (1st)","Strider (2nd)",
  748. X"Strider (3rd)","Scout (1st)","Scout (2nd)","Scout (3rd)","Scout (4th)",
  749. X"Scout (5th)","Courser (1st)","Courser (2nd)","Courser (3rd)","Courser (4th)",
  750. X"Courser (5th)","Tracker (1st)","Tracker (2nd)","Tracker (3rd)",
  751. X"Tracker (4th)","Tracker (5th)","Tracker (6th)","Tracker (7th)",
  752. X"Tracker (8th)","Tracker (9th)","Guide (1st)","Guide (2nd)","Guide (3rd)",
  753. X"Guide (4th)","Guide (5th)","Guide (6th)","Guide (7th)","Guide (8th)",
  754. X"Guide (9th)","Pathfinder-1","Pathfinder-2","Pathfinder-3","Ranger",
  755. X"High Ranger","Ranger Lord"},
  756. X    /* Paladins     */
  757. X{"Gallant","Keeper (1st)","Keeper (2nd)","Keeper (3rd)","Keeper (4th)",
  758. X"Keeper (5th)","Keeper (6th)","Keeper (7th)","Keeper (8th)","Keeper (9th)",
  759. X"Protector-1","Protector-2","Protector-3","Protector-4","Protector-5",
  760. X"Protector-6","Protector-7","Protector-8","Defender-1","Defender-2",
  761. X"Defender-3","Defender-4","Defender-5","Defender-6","Defender-7","Defender-8",
  762. X"Warder (1st)","Warder (2nd)","Warder (3rd)","Warder (4th)","Warder (5th)",
  763. X"Warder (6th)","Warder (7th)","Warder (8th)","Warder (9th)","Guardian",
  764. X"Chevalier","Justiciar","Paladin","High Lord"}
  765. X};
  766. X#endif
  767. X
  768. X/* Base experience levels, may be adjusted up for race and/or class*/
  769. Xint32u player_exp[MAX_PLAYER_LEVEL] = {
  770. X      10,      25,    45,     70,      100,        140,      200,    280,
  771. X     380,     500,     650,    850,     1100,       1400,     1800,     2300,
  772. X    2900,    3600,    4400,    5400,     6800,       8400,    10200,    12500,
  773. X   17500,   25000,  35000L,  50000L,   75000L,    100000L,  150000L,  200000L,
  774. X 300000L, 400000L, 500000L, 750000L, 1500000L, 2500000L, 5000000L, 10000000L
  775. X};
  776. X
  777. X/*Race    STR,INT,WIS,DEX,CON,CHR,
  778. X    Ages, heights, and weights (male then female)
  779. X    Racial Bases for: dis,srh,stl,fos,bth,bthb,bsav,hitdie,
  780. X    infra, exp base, choice-classes */
  781. X#ifdef MACGAME
  782. Xrace_type *race;
  783. X#else
  784. Xrace_type race[MAX_RACES] = {
  785. X   {"Human",     0,  0,     0,  0,     0,  0,
  786. X      14,  6, 72,  6,180, 25, 66,  4,150, 20,
  787. X      0,  0,  0,  0,  0,  0,  0, 10,  0, 100, 0x3F,
  788. X    },
  789. X   {"Half-Elf", -1,  1,     0,  1, -1,  1,
  790. X      24, 16, 66,  6,130, 15, 62,  6,100, 10,
  791. X      2,  6,  1, -1, -1,  5,  3,  9,  2, 110, 0x3F,
  792. X    },
  793. X   {"Elf",    -1,  2,     1,  1, -2,  1,
  794. X      75, 75, 60,  4,100,  6, 54,  4, 80,  6,
  795. X      5,  8,  1, -2, -5, 15,  6,  8,  3, 120, 0x1F,
  796. X    },
  797. X   {"Halfling", -2,  2,     1,  3,     1,  1,
  798. X      21, 12, 36,  3, 60,  3, 33,  3, 50,  3,
  799. X      15, 12,  4, -5,-10, 20, 18,  6,  4, 110, 0x0B,
  800. X    },
  801. X   {"Gnome",    -1,  2,     0,  2,     1, -2,
  802. X      50, 40, 42,  3, 90,  6, 39,  3, 75,  3,
  803. X      10,  6,  3, -3, -8, 12, 12,  7,  4, 125, 0x0F,
  804. X    },
  805. X   {"Dwarf",     2, -3,     1, -2,     2, -3,
  806. X      35, 15, 48,  3,150, 10, 46,  3,120, 10,
  807. X      2,  7,  -1,  0, 15,  0,  9,  9,  5, 120, 0x05,
  808. X    },
  809. X   {"Half-Orc",     2, -1,     0,  0,     1, -4,
  810. X      11,  4, 66,  1,150,  5, 62,  1,120,  5,
  811. X      -3,  0, -1,  3, 12, -5, -3, 10,  3, 110, 0x0D,
  812. X    },
  813. X   {"Half-Troll",4, -4, -2, -4,     3, -6,
  814. X      20, 10, 96, 10,255, 50, 84,  8,225, 40,
  815. X      -5, -1, -2,  5, 20,-10, -8, 12,  3, 120, 0x05,
  816. X    }
  817. X };
  818. X#endif
  819. X
  820. X/* 5 char race for printing scores. */
  821. Xchar *dsp_race[MAX_RACES] = {
  822. X  "Human",
  823. X  "H-Elf",
  824. X  "Elf  ",
  825. X  "Hobbt",
  826. X  "Gnome",
  827. X  "Dwarf",
  828. X  "H-Orc",
  829. X  "H-Tro"
  830. X};
  831. X
  832. X/* Background information                    */
  833. X#ifdef MACGAME
  834. Xbackground_type *background;
  835. X#else
  836. Xbackground_type background[MAX_BACKGROUND] = {
  837. X{"You are the illegitimate and unacknowledged child ",         10, 1, 2, 25},
  838. X{"You are the illegitimate but acknowledged child ",         20, 1, 2, 35},
  839. X{"You are one of several children ",                 95, 1, 2, 45},
  840. X{"You are the first child ",                    100, 1, 2, 50},
  841. X{"of a Serf.  ",                         40, 2, 3, 65},
  842. X{"of a Yeoman.  ",                         65, 2, 3, 80},
  843. X{"of a Townsman.  ",                         80, 2, 3, 90},
  844. X{"of a Guildsman.  ",                         90, 2, 3,105},
  845. X{"of a Landed Knight.  ",                     96, 2, 3,120},
  846. X{"of a Titled Noble.  ",                     99, 2, 3,130},
  847. X{"of a Royal Blood Line.  ",                    100, 2, 3,140},
  848. X{"You are the black sheep of the family.  ",             20, 3,50, 20},
  849. X{"You are a credit to the family.  ",                 80, 3,50, 55},
  850. X{"You are a well liked child.  ",                100, 3,50, 60},
  851. X{"Your mother was a Green-Elf.  ",                 40, 4, 1, 50},
  852. X{"Your father was a Green-Elf.  ",                 75, 4, 1, 55},
  853. X{"Your mother was a Grey-Elf.  ",                 90, 4, 1, 55},
  854. X{"Your father was a Grey-Elf.  ",                 95, 4, 1, 60},
  855. X{"Your mother was a High-Elf.  ",                 98, 4, 1, 65},
  856. X{"Your father was a High-Elf.  ",                100, 4, 1, 70},
  857. X{"You are one of several children ",                 60, 7, 8, 50},
  858. X{"You are the only child ",                    100, 7, 8, 55},
  859. X{"of a Green-Elf ",                         75, 8, 9, 50},
  860. X{"of a Grey-Elf ",                         95, 8, 9, 55},
  861. X{"of a High-Elf ",                        100, 8, 9, 60},
  862. X{"Ranger.  ",                             40, 9,54, 80},
  863. X{"Archer.  ",                             70, 9,54, 90},
  864. X{"Warrior.  ",                             87, 9,54,110},
  865. X{"Mage.  ",                             95, 9,54,125},
  866. X{"Prince.  ",                             99, 9,54,140},
  867. X{"King.  ",                            100, 9,54,145},
  868. X{"You are one of several children of a Halfling ",         85,10,11, 45},
  869. X{"You are the only child of a Halfling ",            100,10,11, 55},
  870. X{"Bum.  ",                             20,11, 3, 55},
  871. X{"Tavern Owner.  ",                         30,11, 3, 80},
  872. X{"Miller.  ",                             40,11, 3, 90},
  873. X{"Home Owner.  ",                         50,11, 3,100},
  874. X{"Burglar.  ",                             80,11, 3,110},
  875. X{"Warrior.  ",                             95,11, 3,115},
  876. X{"Mage.  ",                             99,11, 3,125},
  877. X{"Clan Elder.  ",                        100,11, 3,140},
  878. X{"You are one of several children of a Gnome ",             85,13,14, 45},
  879. X{"You are the only child of a Gnome ",                100,13,14, 55},
  880. X{"Beggar.  ",                             20,14, 3, 55},
  881. X{"Braggart.  ",                             50,14, 3, 70},
  882. X{"Prankster.  ",                         75,14, 3, 85},
  883. X{"Warrior.  ",                             95,14, 3,100},
  884. X{"Mage.  ",                            100,14, 3,125},
  885. X{"You are one of two children of a Dwarven ",             25,16,17, 40},
  886. X{"You are the only child of a Dwarven ",            100,16,17, 50},
  887. X{"Thief.  ",                             10,17,18, 60},
  888. X{"Prison Guard.  ",                         25,17,18, 75},
  889. X{"Miner.  ",                             75,17,18, 90},
  890. X{"Warrior.  ",                             90,17,18,110},
  891. X{"Priest.  ",                             99,17,18,130},
  892. X{"King.  ",                            100,17,18,150},
  893. X{"You are the black sheep of the family.  ",             15,18,57, 10},
  894. X{"You are a credit to the family.  ",                 85,18,57, 50},
  895. X{"You are a well liked child.  ",                100,18,57, 55},
  896. X{"Your mother was an Orc, but it is unacknowledged.  ",         25,19,20, 25},
  897. X{"Your father was an Orc, but it is unacknowledged.  ",        100,19,20, 25},
  898. X{"You are the adopted child ",                    100,20, 2, 50},
  899. X{"Your mother was a Cave-Troll ",                 30,22,23, 20},
  900. X{"Your father was a Cave-Troll ",                 60,22,23, 25},
  901. X{"Your mother was a Hill-Troll ",                 75,22,23, 30},
  902. X{"Your father was a Hill-Troll ",                 90,22,23, 35},
  903. X{"Your mother was a Water-Troll ",                 95,22,23, 40},
  904. X{"Your father was a Water-Troll ",                100,22,23, 45},
  905. X{"Cook.  ",                              5,23,62, 60},
  906. X{"Warrior.  ",                             95,23,62, 55},
  907. X{"Shaman.  ",                             99,23,62, 65},
  908. X{"Clan Chief.  ",                        100,23,62, 80},
  909. X{"You have dark brown eyes, ",                     20,50,51, 50},
  910. X{"You have brown eyes, ",                     60,50,51, 50},
  911. X{"You have hazel eyes, ",                     70,50,51, 50},
  912. X{"You have green eyes, ",                     80,50,51, 50},
  913. X{"You have blue eyes, ",                     90,50,51, 50},
  914. X{"You have blue-gray eyes, ",                    100,50,51, 50},
  915. X{"straight ",                             70,51,52, 50},
  916. X{"wavy ",                             90,51,52, 50},
  917. X{"curly ",                            100,51,52, 50},
  918. X{"black hair, ",                         30,52,53, 50},
  919. X{"brown hair, ",                         70,52,53, 50},
  920. X{"auburn hair, ",                         80,52,53, 50},
  921. X{"red hair, ",                             90,52,53, 50},
  922. X{"blond hair, ",                        100,52,53, 50},
  923. X{"and a very dark complexion.",                     10,53, 0, 50},
  924. X{"and a dark complexion.",                     30,53, 0, 50},
  925. X{"and an average complexion.",                     80,53, 0, 50},
  926. X{"and a fair complexion.",                     90,53, 0, 50},
  927. X{"and a very fair complexion.",                    100,53, 0, 50},
  928. X{"You have light grey eyes, ",                     85,54,55, 50},
  929. X{"You have light blue eyes, ",                     95,54,55, 50},
  930. X{"You have light green eyes, ",                    100,54,55, 50},
  931. X{"straight ",                             75,55,56, 50},
  932. X{"wavy ",                            100,55,56, 50},
  933. X{"black hair, and a fair complexion.",                 75,56, 0, 50},
  934. X{"brown hair, and a fair complexion.",                 85,56, 0, 50},
  935. X{"blond hair, and a fair complexion.",                 95,56, 0, 50},
  936. X{"silver hair, and a fair complexion.",                100,56, 0, 50},
  937. X{"You have dark brown eyes, ",                     99,57,58, 50},
  938. X{"You have glowing red eyes, ",                    100,57,58, 60},
  939. X{"straight ",                             90,58,59, 50},
  940. X{"wavy ",                            100,58,59, 50},
  941. X{"black hair, ",                         75,59,60, 50},
  942. X{"brown hair, ",                        100,59,60, 50},
  943. X{"a one foot beard, ",                         25,60,61, 50},
  944. X{"a two foot beard, ",                         60,60,61, 51},
  945. X{"a three foot beard, ",                     90,60,61, 53},
  946. X{"a four foot beard, ",                        100,60,61, 55},
  947. X{"and a dark complexion.",                    100,61, 0, 50},
  948. X{"You have slime green eyes, ",                     60,62,63, 50},
  949. X{"You have puke yellow eyes, ",                     85,62,63, 50},
  950. X{"You have blue-bloodshot eyes, ",                 99,62,63, 50},
  951. X{"You have glowing red eyes, ",                    100,62,63, 55},
  952. X{"dirty ",                             33,63,64, 50},
  953. X{"mangy ",                             66,63,64, 50},
  954. X{"oily ",                            100,63,64, 50},
  955. X{"sea-weed green hair, ",                     33,64,65, 50},
  956. X{"bright red hair, ",                         66,64,65, 50},
  957. X{"dark purple hair, ",                        100,64,65, 50},
  958. X{"and green ",                             25,65,66, 50},
  959. X{"and blue ",                             50,65,66, 50},
  960. X{"and white ",                             75,65,66, 50},
  961. X{"and black ",                            100,65,66, 50},
  962. X{"ulcerous skin.",                         33,66, 0, 50},
  963. X{"scabby skin.",                         66,66, 0, 50},
  964. X{"leprous skin.",                        100,66, 0, 50}
  965. X};
  966. X#endif
  967. X
  968. X/* Classes.                            */
  969. Xclass_type class[MAX_CLASS] = {
  970. X/*      HP Dis Src Stl Fos bth btb sve S  I  W  D Co Ch  Spell Exp  spl */
  971. X{"Warrior",9, 25, 14, 1, 38, 70, 55, 18, 5,-2,-2, 2, 2,-1, NONE,    0, 0},
  972. X{"Mage",   0, 30, 16, 2, 20, 34, 20, 36,-5, 3, 0, 1,-2, 1, MAGE,   30, 1},
  973. X{"Priest", 2, 25, 16, 2, 32, 48, 35, 30,-3,-3, 3,-1, 0, 2, PRIEST, 20, 1},
  974. X{"Rogue",  6, 45, 32, 5, 16, 60, 66, 30, 2, 1,-2, 3, 1,-1, MAGE,    0, 5},
  975. X{"Ranger", 4, 30, 24, 3, 24, 56, 72, 30, 2, 2, 0, 1, 1, 1, MAGE,   40, 3},
  976. X{"Paladin",6, 20, 12, 1, 38, 68, 40, 24, 3,-3, 1, 0, 2, 2, PRIEST, 35, 1}
  977. X};
  978. X
  979. X/* making it 16 bits wastes a little space, but saves much signed/unsigned
  980. X   headaches in its use */
  981. X/* CLA_MISC_HIT is identical to CLA_SAVE, which takes advantage of
  982. X   the fact that the save values are independent of the class */
  983. Xint16 class_level_adj[MAX_CLASS][MAX_LEV_ADJ] = {
  984. X/*           bth    bthb   device  disarm   save/misc hit  */
  985. X/* Warrior */ {    4,    4,    2,    2,    3 },
  986. X/* Mage    */ { 2,    2,    4,    3,    3 },
  987. X/* Priest  */ { 2,    2,    4,    3,    3 },
  988. X/* Rogue   */ { 3,    4,    3,    4,    3 },
  989. X/* Ranger  */ { 3,    4,    3,    3,    3 },
  990. X/* Paladin */ { 3,    3,    3,    2,    3 }
  991. X};
  992. X
  993. Xint32u spell_learned = 0;    /* bit mask of spells learned */
  994. Xint32u spell_worked = 0;    /* bit mask of spells tried and worked */
  995. Xint32u spell_forgotten = 0;    /* bit mask of spells learned but forgotten */
  996. Xint8u spell_order[32];        /* order spells learned/remembered/forgotten */
  997. X
  998. X/* Warriors don't have spells, so there is no entry for them.  Note that
  999. X   this means you must always subtract one from the py.misc.pclass before
  1000. X   indexing into magic_spell[]. */
  1001. X#ifdef MACGAME
  1002. Xspell_type (*magic_spell)[31];
  1003. X#else
  1004. Xspell_type magic_spell[MAX_CLASS-1][31] = {
  1005. X  {          /* Mage       */
  1006. X     {    1,  1, 22,   1},
  1007. X     {    1,  1, 23,   1},
  1008. X     {    1,  2, 24,   1},
  1009. X     {    1,  2, 26,   1},
  1010. X     {    3,  3, 25,   2},
  1011. X     {    3,  3, 25,   1},
  1012. X     {    3,  3, 27,   2},
  1013. X     {    3,  4, 30,   1},
  1014. X     {    5,  4, 30,   6},
  1015. X     {    5,  5, 30,   8},
  1016. X     {    5,  5, 30,   5},
  1017. X     {    5,  5, 35,   6},
  1018. X     {    7,  6, 35,   9},
  1019. X     {    7,  6, 50,  10},
  1020. X     {    7,  6, 40,  12},
  1021. X     {    9,  7, 44,  19},
  1022. X     {    9,  7, 45,  19},
  1023. X     {    9,  7, 75,  22},
  1024. X     {    9,  7, 45,  19},
  1025. X     { 11,  7, 45,  25},
  1026. X     { 11,  7, 99,  19},
  1027. X     { 13,  7, 50,  22},
  1028. X     { 15,  9, 50,  25},
  1029. X     { 17,  9, 50,  31},
  1030. X     { 19, 12, 55,  38},
  1031. X     { 21, 12, 90,  44},
  1032. X     { 23, 12, 60,  50},
  1033. X     { 25, 12, 65,  63},
  1034. X     { 29, 18, 65,  88},
  1035. X     { 33, 21, 80, 125},
  1036. X     { 37, 25, 95, 200}
  1037. X   },
  1038. X   {          /* Priest       */
  1039. X     {    1,  1, 10,   1},
  1040. X     {    1,  2, 15,   1},
  1041. X     {    1,  2, 20,   1},
  1042. X     {    1,  2, 25,   1},
  1043. X     {    3,  2, 25,   1},
  1044. X     {    3,  3, 27,   2},
  1045. X     {    3,  3, 27,   2},
  1046. X     {    3,  3, 28,   3},
  1047. X     {    5,  4, 29,   4},
  1048. X     {    5,  4, 30,   5},
  1049. X     {    5,  4, 32,   5},
  1050. X     {    5,  5, 34,   5},
  1051. X     {    7,  5, 36,   6},
  1052. X     {    7,  5, 38,   7},
  1053. X     {    7,  6, 38,   9},
  1054. X     {    7,  7, 38,   9},
  1055. X     {    9,  6, 38,  10},
  1056. X     {    9,  7, 38,  10},
  1057. X     {    9,  7, 40,  10},
  1058. X     { 11,  8, 42,  10},
  1059. X     { 11,  8, 42,  12},
  1060. X     { 11,  9, 55,  15},
  1061. X     { 13, 10, 45,  15},
  1062. X     { 13, 11, 45,  16},
  1063. X     { 15, 12, 50,  20},
  1064. X     { 15, 14, 50,  22},
  1065. X     { 17, 14, 55,  32},
  1066. X     { 21, 16, 60,  38},
  1067. X     { 25, 20, 70,  75},
  1068. X     { 33, 24, 90, 125},
  1069. X     { 39, 32, 99, 200}
  1070. X   },
  1071. X   {          /* Rogue       */
  1072. X     { 99, 99,    0,   0},
  1073. X     {    5,  1, 50,   1},
  1074. X     {    7,  2, 55,   1},
  1075. X     {    9,  3, 60,   2},
  1076. X     { 11,  4, 65,   2},
  1077. X     { 13,  5, 70,   3},
  1078. X     { 99, 99,    0,   0},
  1079. X     { 15,  6, 75,   3},
  1080. X     { 99, 99,    0,   0},
  1081. X     { 17,  7, 80,   4},
  1082. X     { 19,  8, 85,   5},
  1083. X     { 21,  9, 90,   6},
  1084. X     { 99, 99,    0,   0},
  1085. X     { 23, 10, 95,   7},
  1086. X     { 99, 99,    0,   0},
  1087. X     { 99, 99,    0,   0},
  1088. X     { 25, 12, 95,   9},
  1089. X     { 27, 15, 99,  11},
  1090. X     { 99, 99,    0,   0},
  1091. X     { 99, 99,    0,   0},
  1092. X     { 29, 18, 99,  19},
  1093. X     { 99, 99,    0,   0},
  1094. X     { 99, 99,    0,   0},
  1095. X     { 99, 99,    0,   0},
  1096. X     { 99, 99,    0,   0},
  1097. X     { 99, 99,    0,   0},
  1098. X     { 99, 99,    0,   0},
  1099. X     { 99, 99,    0,   0},
  1100. X     { 99, 99,    0,   0},
  1101. X     { 99, 99,    0,   0},
  1102. X     { 99, 99,    0,   0},
  1103. X   },
  1104. X   {           /* Ranger        */
  1105. X     {    3,  1, 30,   1},
  1106. X     {    3,  2, 35,   2},
  1107. X     {    3,  2, 35,   2},
  1108. X     {    5,  3, 35,   2},
  1109. X     {    5,  3, 40,   2},
  1110. X     {    5,  4, 45,   3},
  1111. X     {    7,  5, 40,   6},
  1112. X     {    7,  6, 40,   5},
  1113. X     {    9,  7, 40,   7},
  1114. X     {    9,  8, 45,   8},
  1115. X     { 11,  8, 40,  10},
  1116. X     { 11,  9, 45,  10},
  1117. X     { 13, 10, 45,  12},
  1118. X     { 13, 11, 55,  13},
  1119. X     { 15, 12, 50,  15},
  1120. X     { 15, 13, 50,  15},
  1121. X     { 17, 17, 55,  15},
  1122. X     { 17, 17, 90,  17},
  1123. X     { 21, 17, 55,  17},
  1124. X     { 21, 19, 60,  18},
  1125. X     { 23, 25, 95,  20},
  1126. X     { 23, 20, 60,  20},
  1127. X     { 25, 20, 60,  20},
  1128. X     { 25, 21, 65,  20},
  1129. X     { 27, 21, 65,  22},
  1130. X     { 29, 23, 95,  23},
  1131. X     { 31, 25, 70,  25},
  1132. X     { 33, 25, 75,  38},
  1133. X     { 35, 25, 80,  50},
  1134. X     { 37, 30, 95, 100},
  1135. X     { 99, 99,    0,   0}
  1136. X   },
  1137. X   {          /* Paladin       */
  1138. X     {    1,  1, 30,   1},
  1139. X     {    2,  2, 35,   2},
  1140. X     {    3,  3, 35,   3},
  1141. X     {    5,  3, 35,   5},
  1142. X     {    5,  4, 35,   5},
  1143. X     {    7,  5, 40,   6},
  1144. X     {    7,  5, 40,   6},
  1145. X     {    9,  7, 40,   7},
  1146. X     {    9,  7, 40,   8},
  1147. X     {    9,  8, 40,   8},
  1148. X     { 11,  9, 40,  10},
  1149. X     { 11, 10, 45,  10},
  1150. X     { 11, 10, 45,  10},
  1151. X     { 13, 10, 45,  12},
  1152. X     { 13, 11, 45,  13},
  1153. X     { 15, 13, 45,  15},
  1154. X     { 15, 15, 50,  15},
  1155. X     { 17, 15, 50,  17},
  1156. X     { 17, 15, 50,  18},
  1157. X     { 19, 15, 50,  19},
  1158. X     { 19, 15, 50,  19},
  1159. X     { 21, 17, 50,  20},
  1160. X     { 23, 17, 50,  20},
  1161. X     { 25, 20, 50,  20},
  1162. X     { 27, 21, 50,  22},
  1163. X     { 29, 22, 50,  24},
  1164. X     { 31, 24, 60,  25},
  1165. X     { 33, 28, 60,  31},
  1166. X     { 35, 32, 70,  38},
  1167. X     { 37, 36, 90,  50},
  1168. X     { 39, 38, 95, 100}
  1169. X   }
  1170. X };
  1171. X#endif
  1172. X
  1173. Xchar *spell_names[62] = {
  1174. X  /* Mage Spells */
  1175. X  "Magic Missile",  "Detect Monsters",    "Phase Door",  "Light Area",
  1176. X  "Cure Light Wounds",    "Find Hidden Traps/Doors",  "Stinking Cloud",
  1177. X  "Confusion",    "Lightning Bolt",  "Trap/Door Destruction", "Sleep I",
  1178. X  "Cure Poison",  "Teleport Self",  "Remove Curse",  "Frost Bolt",
  1179. X  "Turn Stone to Mud",    "Create Food",    "Recharge Item I",  "Sleep II",
  1180. X  "Polymorph Other",  "Identify",  "Sleep III",     "Fire Bolt",  "Slow Monster",
  1181. X  "Frost Ball",     "Recharge Item II", "Teleport Other",    "Haste Self",
  1182. X  "Fire Ball", "Word of Destruction", "Genocide",
  1183. X  /* Priest Spells, start at index 31 */
  1184. X  "Detect Evil",  "Cure Light Wounds",    "Bless",  "Remove Fear", "Call Light",
  1185. X  "Find Traps",     "Detect Doors/Stairs",     "Slow Poison",     "Blind Creature",
  1186. X  "Portal",  "Cure Medium Wounds",  "Chant",  "Sanctuary",  "Create Food",
  1187. X  "Remove Curse",  "Resist Heat and Cold",  "Neutralize Poison",
  1188. X  "Orb of Draining",  "Cure Serious Wounds",  "Sense Invisible",
  1189. X  "Protection from Evil",  "Earthquake",  "Sense Surroundings",
  1190. X  "Cure Critical Wounds",  "Turn Undead",  "Prayer",  "Dispel Undead",
  1191. X  "Heal",  "Dispel Evil",  "Glyph of Warding",    "Holy Word"
  1192. X};
  1193. X
  1194. X/* Each type of character starts out with a few provisions.    */
  1195. X/* Note that the entries refer to elements of the object_list[] array*/
  1196. X/* 344 = Food Ration, 365 = Wooden Torch, 123 = Cloak, 30 = Stiletto,
  1197. X   103 = Soft Leather Armor, 318 = Beginners-Majik, 322 = Beginners Handbook */
  1198. Xint16u player_init[MAX_CLASS][5] = {
  1199. X        { 344, 365, 123,  30, 103},    /* Warrior     */
  1200. X        { 344, 365, 123,  30, 318},    /* Mage         */
  1201. X        { 344, 365, 123,  30, 322},    /* Priest     */
  1202. X        { 344, 365,  30, 103, 318},    /* Rogue     */
  1203. X        { 344, 365, 123,  30, 318},    /* Ranger     */
  1204. X        { 344, 365, 123,  30, 322}    /* Paladin     */
  1205. X};
  1206. END_OF_FILE
  1207. if test 19680 -ne `wc -c <'source/player.c'`; then
  1208.     echo shar: \"'source/player.c'\" unpacked with wrong size!
  1209. fi
  1210. # end of 'source/player.c'
  1211. fi
  1212. echo shar: End of archive 2 \(of 3\).
  1213. cp /dev/null ark2isdone
  1214. MISSING=""
  1215. for I in 1 2 3 ; do
  1216.     if test ! -f ark${I}isdone ; then
  1217.     MISSING="${MISSING} ${I}"
  1218.     fi
  1219. done
  1220. if test "${MISSING}" = "" ; then
  1221.     echo You have unpacked all 3 archives.
  1222.     echo "Please read the file NOTES01."
  1223.     rm -f ark[1-9]isdone
  1224. else
  1225.     echo You still need to unpack the following archives:
  1226.     echo "        " ${MISSING}
  1227. fi
  1228. ##  End of shell archive.
  1229. exit 0
  1230.